<table>

    <?php foreach ($customer->getPhonenumbers() as $phone): ?>
    <tr>
        <?php if(!is_null($phone->getName()) && $phone->getName() !== '' ): ?>
        <td><?php echo $phone->getName() ?></td><td>
        <?php else: ?>
        <td colspan="2">
        <?php endif;?>
        <?php echo $phone->getPhonenumber() ?></td>
    </tr>
    <?php endforeach ?>
</table>
